import time

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By


service = Service("chromedriver.exe")
driver = webdriver.Chrome(service=service)
driver.get("http://www.baidu.com")
driver.maximize_window()

el1 = driver.find_element(By.ID,value="kw")
el1.send_keys("python")

#强制等待
time.sleep(1)
#隐式等待、显示等待

el2 = driver.find_element(By.XPATH,'/html/body/div[1]/div[1]/div[5]/div/div/form/span[2]/input')
el2.click()
time.sleep(5)


